#include<bits/stdc++.h>
using namespace std;
int c[100005];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n,ma=-1;
    cin>>n;
    int t;
    while (n--)
    {
        cin>>t;
        ma=max(ma,t);
        c[t]++;
    }
    for (int i=2;i<=ma;i++)
    {
        if (c[i]!=0)
        {
            int el=c[i];
            for (int j=1;j<i;j++)
            {
                if (c[j]!=0)
                {
                    if (c[j]>el)
                    {
                        c[j]-=el;
                        break;
                    }
                    else
                    {
                        c[j]=0;
                        el-=c[j];
                    }
                }
            }
        }
    }
    int s=0;
    for (int i=1;i<=ma;i++)
    {
        s+=c[i];
    }
    cout<<s;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
